﻿<%@ Page Language="C#" Inherits="WebManager.BasePage" %>

<%@ Import Namespace="TalentPools.BLL" %>
<%@ Import Namespace="TalentPools.Model" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">

    protected void btnLogin_Click(object sender, EventArgs e)
    {
        string str1;
        string username = Request["UserName"];
        str1 = Request["Password"].ToString();
        string code = Request["Code"];
        if (string.IsNullOrEmpty(username)||string.IsNullOrEmpty(str1))
        {
            JsWindows("用户名或不能为空","Admin_Login.aspx");
            return;
        }
        if (string.IsNullOrEmpty(code))
        {
            JsWindows("请输入验证码","Admin_Login.aspx");
            return;
        }
        string pwd = MyFormatstr(FormsAuthentication.HashPasswordForStoringInConfigFile(str1, "MD5"));
        string srr = Session["ImgCode"].ToString();
        if (Session["ImgCode"].ToString().ToUpper() != code.ToUpper())
        {
            JsWindows("验证码输入错误,请重新输入！", "Admin_Login.aspx");
            return;
        }
        if (new Admin_LoginManager().LoginIn(username, pwd))
        {
            AdminUser(username);
            Response.Redirect("Admin_Default.aspx");
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        if (AdminLogin())
        {
            Response.Redirect("Admin_Default.aspx");
        }
    }
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
<!--
a{ color:#008EE3}
a:link  { text-decoration: none;color:#008EE3}
A:visited {text-decoration: none;color:#666666}
A:active {text-decoration: underline}
A:hover {text-decoration: underline;color: #0066CC}
A.b:link {
	text-decoration: none;
	font-size:12px;
	font-family: "Helvetica,微软雅黑,宋体";
	color: #FFFFFF;
}
A.b:visited {
	text-decoration: none;
	font-size:12px;
	font-family: "Helvetica,微软雅黑,宋体";
	color: #FFFFFF;
}
A.b:active {
	text-decoration: underline;
	color: #FF0000;

}
A.b:hover {text-decoration: underline; color: #ffffff}

.table1 {
	border: 1px solid #CCCCCC;
}
.font {
	font-size: 12px;
	text-decoration: none;
	color: #999999;
	line-height: 20px;
	

}
.input {
	font-size: 12px;
	color: #999999;
	text-decoration: none;
	border: 0px none #999999;


}

td {
	font-size: 12px;
	color: #007AB5;
}
form {
	margin: 1px;
	padding: 1px;
}
input {
	border: 0px;
	height: 26px;
	color: #007AB5;

	.unnamed1 {
	border: thin none #FFFFFF;
}
.unnamed1 {
	border: thin none #FFFFFF;
}
select {
	border: 1px solid #cccccc;
	height: 18px;
	color: #666666;

	.unnamed1 {
	border: thin none #FFFFFF;
}
body {
	background-repeat: no-repeat;
	background-color: #9CDCF9;
	background-position: 0px 0px;

}
.tablelinenotop {
	border-top: 0px solid #CCCCCC;
	border-right: 1px solid #CCCCCC;
	border-bottom: 0px solid #CCCCCC;
	border-left: 1px solid #CCCCCC;
}
.tablelinenotopdown {

	border-top: 1px solid #eeeeee;
	border-right: 1px solid #eeeeee;
	border-bottom: 1px solid #eeeeee;
	border-left: 1px solid #eeeeee;
}
.style6 {FONT-SIZE: 9pt; color: #7b8ac3; }

-->
</style>
</head>
<body style="background-color: #9CDCF9;">
    <form id="form1" runat="server">
    <table width="681" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top: 120px">
        <tr>
            <td width="353" height="259" align="center" valign="bottom" background="Images/login_1.gif">
                <table width="90%" border="0" cellspacing="3" cellpadding="0">
                    <tr>
                        <td align="right" valign="bottom" style="color: #05B8E4">
                            Power by <a href="http://www.865171.cn" target="_blank">865171</a> Copyright 2009
                        </td>
                    </tr>
                </table>
            </td>
            <td width="195" background="Images/login_2.gif">
                <table width="190" height="106" border="0" align="center" cellpadding="2" cellspacing="0">
                    <tr>
                        <td height="50" colspan="2" align="left">
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td width="60" height="30" align="left">
                            登陆名称
                        </td>
                        <td>
                            <input name="UserName" type="text" style="background: url(Images/login_6.gif) repeat-x;
                                border: solid 1px #27B3FE; width: 120px; height: 20px; background-color: #FFFFFF"
                                id="UserName" size="14">
                        </td>
                    </tr>
                    <tr>
                        <td height="30" align="left">
                            登陆密码
                        </td>
                        <td>
                            <input name="Password" type="password" style="background: url(Images/login_6.gif) repeat-x;
                                border: solid 1px #27B3FE; width: 120px; height: 20px; background-color: #FFFFFF"
                                id="Password" size="16">
                        </td>
                    </tr>
                    <tr>
                        <td height="30">
                            验 证 码
                        </td>
                        <td>
                            <input name="Code" type="text" id="Code" size="4" style="background: url(Images/login_6.gif) repeat-x;
                                border: solid 1px #27B3FE; width: 60px; height: 20px; background-color: #FFFFFF"
                                maxlength="4">
                            <img src="../HandlerControl/RndNumber.aspx" onclick="this.src=this.src+'?'" alt="看不清？点击换图片"
                                width="50" height="24" />
                        </td>
                    </tr>
                    <tr>
                        <td height="40" colspan="2" align="center">
                            <img src="Images/tip.gif" width="16" height="16">
                            请勿非法登陆！
                        </td>
                        <tr>
                            <td colspan="2" align="center">
                                <asp:Button ID="btnLogin" Width="69px" Height="24px" Text="登 录" Style="background: url(Images/login_5.gif) no-repeat;
                                    height: 24px; width: 69px; text-align: center;" runat="server" OnClick="btnLogin_Click" />
                                <input type="reset" name="Submit" style="background: url(Images/login_5.gif) no-repeat;
                                    height: 24px; width: 69px; text-align: center;" value=" 取  消 ">
                            </td>
                            <tr>
                                <td height="5" colspan="2">
                                </td>
                </table>
            </td>
            <td width="133" background="Images/login_3.gif">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td height="161" colspan="3" background="Images/login_4.gif">
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
